package com.example.pomelo_home.dao;

import com.example.pomelo_home.entity.Manager;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Query;
import org.springframework.stereotype.Repository;

import java.util.List;
import java.util.Map;

@Repository
public interface ManagerRepository extends JpaRepository<Manager,Integer> {
    @Query(value = "SELECT * FROM manager WHERE username=? AND password=?", nativeQuery = true)
    public List<Map<Integer, Object>> findUser(String name, String password);


}
